").append(g.clone()).html()),void 0!==i[f+1]&&(h=i.eq(f+1).addClass("quick-view-next"),h=a("
").append(h.clone()).html()),woodmartThemeModule.quickViewLoad(d,c,g,h)})},woodmartThemeModule.quickViewCarousel=function(){if(void 0!==a.fn.owlCarousel){var b=a(".product-quick-view .woocommerce-product-gallery__wrapper");b.trigger("destroy.owl.carousel"),b.addClass("owl-carousel").owlCarousel({rtl:woodmartThemeModule.$body.hasClass("rtl"),items:1,dots:!1,nav:!0,navText:!1,navClass:["owl-prev wd-btn-arrow","owl-next wd-btn-arrow"]})}},woodmartThemeModule.quickViewLoad=function(b,c){var d={id:b,action:"woodmart_quick_view"},e=function(b){var c=a(b);a.magnificPopup.open({items:{src:c,type:"inline"},tClose:woodmart_settings.close,tLoading:woodmart_settings.loading,removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass="mfp-move-horizontal quick-view-wrapper"},open:function(){var b=a(".variations_form");b.each(function(){a(this).wc_variation_form().find(".variations select:eq(0)").change()}),b.trigger("wc_variation_form"),woodmartThemeModule.$body.trigger("woodmart-quick-view-displayed"),woodmartThemeModule.$document.trigger("wdQuickViewOpen"),setTimeout(function(){woodmartThemeModule.$document.trigger("wdQuickViewOpen300")},300),woodmartThemeModule.quickViewCarousel()}}})};a.ajax({url:woodmart_settings.ajaxurl,data:d,method:"get",success:function(b){woodmartThemeModule.removeDuplicatedStylesFromHTML(b,function(b){woodmart_settings.quickview_in_popup_fix?(a.magnificPopup.close(),setTimeout(function(){e(b)},500)):e(b)})},complete:function(){c.removeClass("loading")}})},a(document).ready(function(){woodmartThemeModule.quickViewInit(),woodmartThemeModule.quickViewCarousel()})}(jQuery);
!function(a){woodmartThemeModule.$document.on("wdQuickShopSuccess wdQuickViewOpen wdUpdateWishlist",function(){woodmartThemeModule.swatchesVariations()}),woodmartThemeModule.swatchesVariations=function(){var b=a(".variations_form"),c=!1,d=!1;a(".variations_form .label").on("click",function(b){a(this).siblings(".value").hasClass("with-swatches")&&b.preventDefault()}),b.each(function(){var b=a(this);b.data("swatches")||(b.data("swatches",!0),b.data("product_variations")||b.find(".swatches-select").find("> div").addClass("swatch-enabled"),a(".swatches-select > div").hasClass("active-swatch")&&b.addClass("variation-swatch-selected"),b.on("click",".swatches-select > div",function(){var c=a(this),d=c.data("value"),f=c.parent().data("id"),g=c.data("title");e(b),c.hasClass("active-swatch")||c.hasClass("swatch-disabled")||(b.find("select#"+f).val(d).trigger("change"),c.parent().find(".active-swatch").removeClass("active-swatch"),c.addClass("active-swatch"),e(b),("yes"===woodmart_settings.swatches_labels_name&&woodmartThemeModule.$window.width()>=769||woodmartThemeModule.$window.width()<=768)&&c.parents("tr").find(".wd-attr-selected").html(g))}).on("woocommerce_update_variation_values",function(){e(b)}).on("click",".reset_variations",function(){b.find(".active-swatch").removeClass("active-swatch"),("yes"===woodmart_settings.swatches_labels_name&&woodmartThemeModule.$window.width()>=769||woodmartThemeModule.$window.width()<=768)&&b.find(".wd-attr-selected").html("")}).on("reset_data",function(){var d=a(this),g=!0,i=!1;b.find(".variations select").each(function(){0===(d.val()||"").length?g=!1:i=!0}),g&&d.parent().find(".active-swatch").removeClass("active-swatch"),b.removeClass("variation-swatch-selected");var j=a(".woocommerce-product-gallery__wrapper.owl-carousel");if(e(b),m("default",b),j.hasClass("owl-carousel")){"yes"===woodmart_settings.product_slider_auto_height?(!f()&&h("default",b)&&c&&j.trigger("destroy.owl.carousel"),a(".product-images").imagesLoaded(function(){j=j.owlCarousel(woodmartThemeModule.mainCarouselArg),j.trigger("refresh.owl.carousel")})):(j=j.owlCarousel(woodmartThemeModule.mainCarouselArg),j.trigger("refresh.owl.carousel"));var k="centered"===woodmart_settings.product_gallery.thumbs_slider.position?woodmart_settings.centered_gallery_start:0;f()&&(k=0),j.trigger("to.owl.carousel",k)}}).on("reset_image",function(){var c=a(".thumbnails .product-image-thumbnail img").first();f()||g(b)||c.wc_reset_variation_attr("src")}).on("show_variation",function(e,i){if(("yes"===woodmart_settings.swatches_labels_name&&woodmartThemeModule.$window.width()>=769||woodmartThemeModule.$window.width()<=768)&&!d&&(b.find(".active-swatch").each(function(){var b=a(this),c=b.data("title");b.parents("tr").find(".wd-attr-selected").html(c)}),d=!0),i.image.src){var j=b.parents(".single-product-content").find('.thumbnails .product-image-thumbnail img[data-o_src="'+i.image.thumb_src+'"]').length>0,l=b.parents(".single-product-content").find(".thumbnails .product-image-thumbnail img").first(),n=b.parents(".single-product-content").find(".woocommerce-product-gallery .woocommerce-product-gallery__image > a").first().data("o_href");j&&l.wc_reset_variation_attr("src"),g(b)||m(i.variation_id,b)||(l.attr("src")!==i.image.thumb_src&&l.wc_set_variation_attr("src",i.image.src),woodmartThemeModule.$document.trigger("wdShowVariationNotQuickView")),b.addClass("variation-swatch-selected"),g(b)||f()||n===i.image.full_src||k();var o=a(".woocommerce-product-gallery__wrapper.owl-carousel");if(o.hasClass("owl-carousel")){"yes"===woodmart_settings.product_slider_auto_height?(!f()&&h(i.variation_id,b)&&c&&o.trigger("destroy.owl.carousel"),a(".product-images").imagesLoaded(function(){o=o.owlCarousel(woodmartThemeModule.mainCarouselArg),o.trigger("refresh.owl.carousel")})):(o=o.owlCarousel(woodmartThemeModule.mainCarouselArg),o.trigger("refresh.owl.carousel"));var p=a(".images .thumbnails");o.trigger("to.owl.carousel",0),p.hasClass("owl-carousel")?(p.owlCarousel().trigger("to.owl.carousel",0),p.find(".active-thumb").removeClass("active-thumb"),p.find(".product-image-thumbnail").eq(0).addClass("active-thumb")):p.hasClass("slick-slider")&&(p.slick("slickGoTo",0),p.find(".product-image-thumbnail").eq(0).hasClass("active-thumb")||(p.find(".active-thumb").removeClass("active-thumb"),p.find(".product-image-thumbnail").eq(0).addClass("active-thumb")))}}}))});var e=function(b){b.data("product_variations")&&b.find(".variations select").each(function(){var b=a(this),c=b.parent().find(".swatches-select"),d=b.html();d=a(d),c.find("> div").removeClass("swatch-enabled").addClass("swatch-disabled"),d.each(function(){var b=a(this).val();a(this).hasClass("enabled")?c.find('div[data-value="'+b+'"]').removeClass("swatch-disabled").addClass("swatch-enabled"):c.find('div[data-value="'+b+'"]').addClass("swatch-disabled").removeClass("swatch-enabled")})})},f=function(){return a(".single-product-content").hasClass("product-quick-view")},g=function(a){return a.parent().hasClass("quick-shop-form")},h=function(a,b){return"old"===woodmart_settings.variation_gallery_storage_method?i(a):j(a,b)},i=function(a){if("undefined"!=typeof woodmart_variation_gallery_data||"undefined"!=typeof woodmart_qv_variation_gallery_data){var b=f()?woodmart_qv_variation_gallery_data:woodmart_variation_gallery_data;return void 0!==b&&b&&b[a]}},j=function(a,b){var c=l(b);return void 0!==c&&c&&c[a]&&c[a].length>1},k=function(){if("yes"===woodmart_settings.swatches_scroll_top_desktop&&woodmartThemeModule.$window.width()>=1024||"yes"===woodmart_settings.swatches_scroll_top_mobile&&woodmartThemeModule.$window.width()<=1024){var b=a("html, body");b.stop(!0),woodmartThemeModule.$window.on("mousedown wheel DOMMouseScroll mousewheel keyup touchmove",function(){b.stop(!0)}),b.animate({scrollTop:a(".product-image-summary").offset().top-150},800),a(".wd-swatch").tooltip("hide")}},l=function(a){var b=a.data("product_variations"),c=[];return b?(b.forEach(function(a){c[a.variation_id]=a.additional_variation_images,c.default=a.additional_variation_images_default}),c):c},m=function(b,d){if("old"===woodmart_settings.variation_gallery_storage_method){if(!h(b,d)||g(d)||"default"===b&&!c)return!1;n(b,d)}else{if(!h(b,d)||g(d)||"default"===b&&!c)return!1;var e=l(d);o(e[b],d)}return woodmartThemeModule.quickViewCarousel(),a(".woocommerce-product-gallery__image").trigger("zoom.destroy"),woodmartThemeModule.$document.trigger("wdReplaceMainGallery"),f()||woodmartThemeModule.$document.trigger("wdReplaceMainGalleryNotQuickView"),c="default"!==b,woodmartThemeModule.$window.trigger("resize"),!0},n=function(a,b){var c=f()?woodmart_qv_variation_gallery_data:woodmart_variation_gallery_data,d=c[a],e=b.parents(".single-product-content").find(".woocommerce-product-gallery__wrapper");e.empty();for(var g=0;g
';f()||(h+=''),h+=d[g].image,f()||(h+=""),h+="",e.append(h)}},o=function(a,b){var c=b.parents(".single-product-content").find(".woocommerce-product-gallery__wrapper");c.empty();for(var d in a)if(a.hasOwnProperty(d)){var e='
",c.append(e)}}},a(document).ready(function(){woodmartThemeModule.swatchesVariations()})}(jQuery);
!function(a){woodmartThemeModule.scrollTop=function(){var b=a(".scrollToTop");woodmartThemeModule.$window.on("scroll",function(){a(this).scrollTop()>100?b.addClass("button-show"):b.removeClass("button-show")}),b.on("click",function(){return a("html, body").animate({scrollTop:0},800),!1})},a(document).ready(function(){woodmartThemeModule.scrollTop()})}(jQuery);
!function(a){woodmartThemeModule.mobileNavigation=function(){function b(){e.addClass("wd-opened"),g.addClass("wd-close-side-opened")}function c(){e.removeClass("wd-opened"),g.removeClass("wd-close-side-opened"),a(".mobile-nav .searchform input[type=text]").blur()}var d=woodmartThemeModule.$body,e=a(".mobile-nav"),f=a(".mobile-nav .wd-nav-mobile .menu-item-has-children"),g=a(".wd-close-side");f.append('
'),e.on("click",".wd-nav-opener",function(b){b.preventDefault();var c=a(this),d=c.parent();d.hasClass("opener-page")?(d.removeClass("opener-page").find("> ul").slideUp(200),d.removeClass("opener-page").find(".wd-dropdown-menu .container > ul, .wd-dropdown-menu > ul").slideUp(200),d.find("> .wd-nav-opener").removeClass("wd-active")):(d.addClass("opener-page").find("> ul").slideDown(200),d.addClass("opener-page").find(".wd-dropdown-menu .container > ul, .wd-dropdown-menu > ul").slideDown(200),d.find("> .wd-nav-opener").addClass("wd-active"))}),e.on("click",".wd-nav-mob-tab li",function(b){b.preventDefault();var c=a(this),d=c.data("menu");c.hasClass("wd-active")||(c.parent().find(".wd-active").removeClass("wd-active"),c.addClass("wd-active"),a(".wd-nav-mobile").removeClass("wd-active"),a(".mobile-"+d+"-menu").addClass("wd-active"))}),d.on("click",".wd-header-mobile-nav > a",function(a){a.preventDefault(),e.hasClass("wd-opened")?c():b()}),d.on("click touchstart",".wd-close-side",function(){c()}),d.on("click",".mobile-nav .login-side-opener",function(){c()})},a(document).ready(function(){woodmartThemeModule.mobileNavigation()})}(jQuery);
!function(a){woodmartThemeModule.cartWidget=function(){var b=woodmartThemeModule.$body,c=a(".cart-widget-side"),d=a(".wd-close-side");b.on("click",".cart-widget-opener",function(a){h()||i()||a.preventDefault(),g()?e():setTimeout(function(){f()},10)}),b.on("click touchstart",".wd-close-side",function(){g()&&e()}),b.on("click",".close-side-widget",function(a){a.preventDefault(),g()&&e()}),woodmartThemeModule.$document.on("keyup",function(a){27===a.keyCode&&g()&&e()});var e=function(){c.removeClass("wd-opened"),d.removeClass("wd-close-side-opened")},f=function(){if(h()||i())return!1;c.addClass("wd-opened"),d.addClass("wd-close-side-opened")},g=function(){return c.hasClass("wd-opened")},h=function(){return woodmartThemeModule.$body.hasClass("woocommerce-cart")},i=function(){return woodmartThemeModule.$body.hasClass("woocommerce-checkout")}},a(document).ready(function(){woodmartThemeModule.cartWidget()})}(jQuery);